start_info->mod_start = vinitrd_start;
start_info->mod_len = initrd_len;
}
- strncpy(start_info->cmd_line, cmdline, MAX_CMDLINE);
+ strncpy((char *)start_info->cmd_line, cmdline, MAX_CMDLINE);
start_info->cmd_line[MAX_CMDLINE-1] = '\0';
munmap(start_info, PAGE_SIZE);
plan9header(Exec * header)
{
/* header is big-endian */
- swabby(&header->magic, "magic");
- swabby(&header->text, "text");
- swabby(&header->data, "data");
- swabby(&header->bss, "bss");
- swabby(&header->syms, "syms");
- swabby(&header->entry, "entry");
- swabby(&header->spsz, "spsz");
- swabby(&header->pcsz, "pcsz");
+ swabby((unsigned long *)&header->magic, "magic");
+ swabby((unsigned long *)&header->text, "text");
+ swabby((unsigned long *)&header->data, "data");
+ swabby((unsigned long *)&header->bss, "bss");
+ swabby((unsigned long *)&header->syms, "syms");
+ swabby((unsigned long *)&header->entry, "entry");
+ swabby((unsigned long *)&header->spsz, "spsz");
+ swabby((unsigned long *)&header->pcsz, "pcsz");
}
unsigned long ksize;
mmu_t *mmu = NULL;
int i;
- unsigned long first_page_after_kernel,
- first_data_page,
+ unsigned long first_page_after_kernel = 0,
+ first_data_page = 0,
page_array_page;
unsigned long cpu0pdb, cpu0pte, cpu0ptelast;
unsigned long /*last_pfn, */ tot_pte_pages;
start_info->flags = 0;
DPRINTF((" control event channel is %d\n", control_evtchn));
start_info->domain_controller_evtchn = control_evtchn;
- strncpy(start_info->cmd_line, cmdline, MAX_CMDLINE);
+ strncpy((char *)start_info->cmd_line, cmdline, MAX_CMDLINE);
start_info->cmd_line[MAX_CMDLINE - 1] = '\0';
munmap(start_info, PAGE_SIZE);
unsigned int control_evtchn, unsigned long flags)
{
dom0_op_t launch_op, op;
- unsigned long load_addr;
+ unsigned long load_addr = 0;
long tot_pages;
int kernel_fd = -1;
gzFile kernel_gfd = NULL;
page_array[(vboot_params_start-dsi.v_start)>>PAGE_SHIFT]);
memset(boot_paramsp, 0, sizeof(*boot_paramsp));
- strncpy(boot_paramsp->cmd_line, cmdline, 0x800);
+ strncpy((char *)boot_paramsp->cmd_line, cmdline, 0x800);
boot_paramsp->cmd_line[0x800-1] = '\0';
boot_paramsp->cmd_line_ptr = ((unsigned long) vboot_params_start) + offsetof(struct linux_boot_params, cmd_line);
return dict;
}
- return PyString_FromStringAndSize(xum->msg.msg, xum->msg.length);
+ return PyString_FromStringAndSize((char *)xum->msg.msg, xum->msg.length);
}
static PyObject *xu_message_get_header(PyObject *self, PyObject *args)
int size;
memset (&remote_addr, 0, sizeof (remote_addr));
size = sizeof remote_addr;
- ret = accept(listen_fd, (struct sockaddr *)&remote_addr, &size);
+ ret = accept(listen_fd, (struct sockaddr *)&remote_addr, (socklen_t *)&size);
if ( ret < 0 )
{
perror("accept()");
int err = 0, k = 0;
//dprintf(">\n");
if(s->eof) goto exit;
- err = unmarshal_uint32(s->io, &k);
+ err = unmarshal_uint32(s->io, (unsigned int *)&k);
if(err) goto exit;
if(k > s->inbuf_size){
err = -EINVAL;
int unmarshal_string(IOStream *io, char *s, uint32_t s_n){
int err = 0, val_n = 0;
//dprintf(">\n");
- err = unmarshal_uint32(io, &val_n);
+ err = unmarshal_uint32(io, (unsigned int *)&val_n);
if(err) goto exit;
if(val_n >= s_n){
err = -EINVAL;
int err = 0, val_n = 0;
char *val = NULL;
//dprintf(">\n");
- err = unmarshal_uint32(io, &val_n);
+ err = unmarshal_uint32(io, (unsigned int *)&val_n);
if(err) goto exit;
val = allocate(val_n + 1);
if(!val){
err = unpack_cons(io, &val);
break;
case T_BOOL:
- err = unpack_bool(io, &u);
+ err = unpack_bool(io, (int *)&u);
if(err) goto exit;
val = (u ? OTRUE : OFALSE);
break;
err = -EINVAL;
goto exit;
}
- err = intof(sxpr_childN(sxpr, 0, ONONE), &hello_major);
+ err = intof(sxpr_childN(sxpr, 0, ONONE), (int *)&hello_major);
if(err) goto exit;
- err = intof(sxpr_childN(sxpr, 1, ONONE), &hello_minor);
+ err = intof(sxpr_childN(sxpr, 1, ONONE), (int *)&hello_minor);
if(err) goto exit;
if(hello_major != major || hello_minor != minor){
eprintf("> Wanted protocol version %d.%d, got %d.%d",
if(!err) err = errcode;
} else if(sxpr_elementp(sxpr, oxfr_xfr_ok)){
// Ok - get the new domain id.
- err = intof(sxpr_childN(sxpr, 0, ONONE), &state->vmid_new);
+ err = intof(sxpr_childN(sxpr, 0, ONONE), (int *)&state->vmid_new);
xfr_error(peer, err);
} else {
// Anything else is invalid. But it may be too late.
int n = 0;
dprintf("> xfr.migrate\n");
- err = intof(sxpr_childN(sxpr, n++, ONONE), &state->vmid);
+ err = intof(sxpr_childN(sxpr, n++, ONONE), (int *)&state->vmid);
if(err) goto exit;
err = stringof(sxpr_childN(sxpr, n++, ONONE), &state->vmconfig);
if(err) goto exit;
int n = 0;
dprintf("> xfr.save\n");
- err = intof(sxpr_childN(sxpr, n++, ONONE), &state->vmid);
+ err = intof(sxpr_childN(sxpr, n++, ONONE), (int *)&state->vmid);
if(err) goto exit;
err = stringof(sxpr_childN(sxpr, n++, ONONE), &state->vmconfig);
if(err) goto exit;
int n = 0;
dprintf("> xfr.xfr\n");
- err = intof(sxpr_childN(sxpr, n++, ONONE), &state->vmid);
+ err = intof(sxpr_childN(sxpr, n++, ONONE), (int *)&state->vmid);
if(err) goto exit;
err = xfr_recv(args, state, conn);